local sk__shelie = fk.CreateSkill {

  name = "sk__shelie",

  tags = { Skill.Compulsory, },

}



sk__shelie:addEffect(fk.CardUseFinished, {
  name = "sk__shelie",
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(sk__shelie.name) and not table.contains(player:getTableMark("sk__shelie-turn"), data.card.type)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local mark = player:getTableMark("sk__shelie-turn")
    table.insert(mark, data.card.type)
    room:setPlayerMark(player, "sk__shelie-turn", mark)
    local cards = room:getCardsFromPileByRule(".|.|.|.|.|^"..data.card:getTypeString(), 2, "drawPile")
    if #cards > 0 then
      room:moveCardTo(cards, Card.PlayerHand, player, fk.ReasonJustMove, sk__shelie.name, nil, false, player)
    end
  end,
})

return sk__shelie